package com.xxx.springboot.pojo.bean.tireNode;

public class TrieNodeTest {

    public static void main(String[] args) {
        Trie trie = new Trie();
        trie.insert("apple");
        System.out.println(trie.search("apple"));   // 输出 true
        System.out.println(trie.search("app"));     // 输出 false
        System.out.println(trie.startsWith("app"));       // 输出 true
        trie.insert("app");
        System.out.println(trie.search("app"));     // 输出 true
        trie.delete("apple");
        System.out.println(trie.search("apple"));     // 输出 false
    }

}
